Static map with marker?

133 views
Skip to first unread message

Pedro

unread,
Jun 6, 2018, 7:00:27 PM6/6/18
to MapTiler Community
I am considering upgrading my current plan (Vector) to start using static maps as an image. With Google Maps I could specify the coordinates of a marker in the URL and the rendered image would have that marker (see https://developers.google.com/maps/documentation/maps-static/intro for an example).

Does this feature exist with MapTiler? I would test myself but I cannot without upgrading my plan.

Mark

unread,
Jul 29, 2018, 10:07:53 PM7/29/18
to MapTiler Community
When you have signed in (using a free account even), you can use the static map generator page: https://cloud.maptiler.com/maps/basic/static

It lists having markers as an option (but not using custom icons):

Adding overlay & more

It is possible to add these parameters to the URL (in addition to the required key):

Polygon

  • path - comma-separated lng,lat, pipe-separated pairs
    • e.g. 5.9,45.8|5.9,47.8|10.5,47.8|10.5,45.8|5.9,45.8
    • latlng ( latlng=true or latlng=1) - indicates the path coordinates are in lat,lng order rather than the usual lng,lat
  • encodedpath - Path encoded according to Google Encoded Polyline Format
    • e.g. _p~iF~ps|U_ulLnnqC_mqNvxq`@
    • encodedpath has priority over path (if both are specified)
  • fill - color to use as the fill (e.g. redrgba(255,255,255,0.5)#0000ffnonefalse)
  • stroke - color of the path stroke
  • width - width of the stroke (in pixels)
  • padding - “percetange” padding for fitted endpoints (bounds-based and auto)
    • e.g. value of 0.1 means “add 10% size to each side to make sure the area of interest is nicely visible”

Markers

  • markers - comma-separated lng,lat, pipe-separated pairs
    • e.g. 14.4,50.1|8.6,47.4|2.4,48.9 - 3 separate markers will be displayed

Other

  • attribution (attribution=false or attribution=0) to disable attribution (make sure to display the correct attribution yourself in case you use this)
Reply all
Reply to author
Forward
0 new messages