Add marker in Mapbox URL (not via JS) - mapbox

I'd like to generate a link to a Mapbox map, centered on a particular latitude and longitude, that also contains a marker on that spot. This is trivial when generating a static map:
https://api.mapbox.com/v4/mapbox.streets/pin-m(<lat>,<lon>)/<lat>,<lon>,<zoom>/320x160.png?access_token=<access token>
with the pin-m() segment specifying the marker. When generating a link to a full, interactive (zoomable/pannable) map, however, specifying a marker doesn't seem to be an option. This URL goes to the map I want:
https://api.mapbox.com/v4/mapbox.streets/zoompan.html?access_token=<access token>#<zoom>/<lat>/<lon>
but there's no marker. I looked through all the documentation and couldn't find any reference to a way to do this. From the docs it looks like the only way to add a marker to the map is to host a page and generate the map via JS in a script. I can do this, but I'd much prefer to be able to just add a parameter to a URL instead of adding a whole new route/controller/view/associated specs for our Rails app for what seems to me to be a very minor addition.
Does anybody know of an undocumented way to do this? Or a documented way that I've just overlooked?

You aren't able to add a marker through a url parameter like the static API allows. You could add a marker by following this example for Mapbox JS or you could use the newer Mapbox GL JS to center the map around a marker like in this example.
I Hope this helps

Related

How to specify zoom level in an OpenStreetMap query?

I would like to include in my software automatically generated links to www.openstreetmap.org that shows a specified address. Something like
click here to see the map
This basic functionality is working right now, but the displayed map zoom level is a bit too high. I would like to set a custom zoom level as a get parameter. It is possible ?
I tried https://www.openstreetmap.org/search?zoom=15&query=<MyCustomAddress> and also z and map parameters without success, and I can't find any documentation about this on the Wiki.

vector tiles, mapbox style.json

I'd like to use the here maps vector tiles in a mapbox gl app. However, in order to do so, I need to define a style.json, see here for the spec, and here for an example.
Does here have a base style.json that I can use?
On the examples page, where using Mapbox is discussed, the documentation simply says: style: "map_style.json", // you should use your own style. It's a bit of a PITA (pain in the a**) to build from scratch, though.
Thanks for any help.
map_style.json -
this could be different for different use case and plain "JSON" file. This needs to be according to the map properties that needs to be displayed to use the other container style.

How to call Javascript code from ScalaJS leafletJS

I am working with the ScalaJS library
https://github.com/fancellu/scalajs-leaflet and I am looking to incorporate some custom javascript from https://jackzoushao.github.io/leaflet-marker-direction
The key functionality is the ability to rotate the markers based on the direction of travel.
Any tips on how to achieve this will be greatly appreciated.
Look at
https://github.com/fancellu/scalajs-leaflet/blob/master/core/src/main/scala/com/felstar/scalajs/leaflet/Leaflet.scala
Note the Marker, they create an AngleMarker
Try creating appropriae AngleMarker scala code, and pull in the js
Also look at how I pulled in some GeoJSON.js object
https://github.com/fancellu/scalajs-leaflet/commit/1ebbbdc40ef8cdde7aee362864b5f2812d9be5b6

Mapbox Studio Map doesn't match Mapbox in Xcode

I have made a simple Mapbox map that includes all national borders but no country names. You can see that map here:
https://api.mapbox.com/styles/v1/rabbigarfinkel/cj4dipjb91i2l2snx81n7ka38.html?title=true&access_token=pk.eyJ1IjoicmFiYmlnYXJmaW5rZWwiLCJhIjoiY2l2dnNuZWV0MDBiaDJ6cHNqNWx4MW00ZCJ9.KHHbkW5oQAXiwrh3w5xCqQ#0.4/0.002700/0.488694/0
But when I plug the map's Style URL into Interface Builder, the country names are all present. I have hidden/deleted the relevant layers, and that is reflected correctly in the URL above. But I always get the same map no matter what.
What should I do to get rid of the country names?
Thank you,
Eli
I discovered that setting the maps styleURL in code rather than in Interface Builder solved my problem.

creating custom leaflet marker on map with idxbroker code

I created a real estate website that uses a company called idxbroker to handle the data from the mls (multiple listing service). I want to have a custom marker to populate on the map for property listings that I have personally so that they stand out when someone searches for properties. Idxbroker does this, however, the marker they provide for my personal listings has a tiny star inside of the same marker used for all listings and you wouldn't realize it unless you were looking for it. I know how to create a custom marker based on leaflet doc's, but not sure how to implement this since idxbroker hosts all this data from their server on my custom subdomain. Is there a way to inject javascript into their code so that my listings have a custom marker?general marker & marker for my listings
Are you looking to add a custom marker on a results page or on the details pages?
It might be easier to just hide the IDX map and write your own in it's place with your custom marker.
Can you provide a map code sample or a link to the page you are trying to customize?