Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 9382

An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps

17 votes

Free tile provider for Leaflet

You can simply use Leaflet Provider extension to pickup the tile works the best for your project. …
Vanni Zhang's user avatar
  • 1,073
3 votes
Accepted

How to create a map using LeafLet

You can try to use this tutorial from MapBox to get started. You will need to create your own GeoJSON data for the stores and fountains that you want to display, and you can use this website to gene …
Vanni Zhang's user avatar
  • 1,073
2 votes
Accepted

Leaflet js : text is not showing on map

The issue is you are trying to call the createLabelIcon function before it is defined. I updated the code on the jsfiddle you provided by putting the createLabelIcon function on top and the code is w …
Vanni Zhang's user avatar
  • 1,073
2 votes
Accepted

Dynamic Layer Name - Leaflet Layer Control

According to the Leaflet documentation, the layer config is an object literal with layer names as keys and layer objects as values. …
Vanni Zhang's user avatar
  • 1,073
2 votes
Accepted

Leaflet marker is not displaying

Your code looks correct and the marker is visible, however, you will need to zoom out a little bit to see it since the marker you dropped is too close to the north pole (see image below): I tested …
Vanni Zhang's user avatar
  • 1,073
1 vote

extract coordinates from geojson

The Server Side application you built only returns you the geometry part of the GeoJSON object, in order to display it as a GeoJSON layer in Leaflet, you need to create an actual GeoJSON object like this …
Vanni Zhang's user avatar
  • 1,073
1 vote

Leaflet and census block data: not displaying

Your code looks OK but you should load the base map layer before the geojson layer. Try to make the following change and see if it will fix the issue or not: var map = L.map('map').setView([ 32.6781, …
Vanni Zhang's user avatar
  • 1,073
1 vote
Accepted

Have to click twice to open popup leaflet

I don't think you will need to call the highlightSelection function, try to update the onEachFeature function to something like the one below to append content to popup window for each layer: // Acti …
Vanni Zhang's user avatar
  • 1,073
1 vote
Accepted

How to add remote GeoJSON data to a Leaflet map as a new layer?

Leaflet expects GeoJSON objects to be in EPSG:4326 (WGS 84) and the entire API uses 4326 so you should try to reproject your layer on the server side first before render them on the map. …
Vanni Zhang's user avatar
  • 1,073
1 vote

Using Leaflet: How do I get it to display one popup based on a condition?

You can use the onEachFeature option of the GeoJSON layer to append the popups to each feature. And you can switch the popup contents inside of the onEachFeature function. I made an example on jsfidd …
Vanni Zhang's user avatar
  • 1,073
1 vote
Accepted

Displaying properties from GeoJSON file in choropleth map using Leaflet.js?

I checked your code and it appears all you did in your ajax success callback function is adding the features to the GeoJson Layer you created without calling the style function. Try to update your co …
Vanni Zhang's user avatar
  • 1,073