Tag Info

Hot answers tagged

8

There's a lot of subjectivity still in play, but I think a broad answer to your question is that it's getting easier every day to use GeoJSON directly in a leaflet map without tiling, and this is ultimately a good direction for interactive maps to be going. As such I tend to build maps using your third option above. That comes with a few caveats. You ...


5

You can get it with JSTS. Check DistanceOp.js.


4

Echoing Bill: it depends. I would say never/rarely do the second option. Keep your data and styling separate. The first and third options might be rephrased as "when should I use a service to render map features?" and "when should I use Leaflet to render map features in-browser?" For me, I try to do the third option whenever I can. Rendering features in ...


2

Thanks for the clarification. It appears that you are mixing the ArcGIS JS API's map object with the Google Maps API's heatmap functionality. This is highly unlikely to work. Instead you could look at the ArcGIS Server JS API's heatmap functionality. This isn't officially supported but stands a better chance of working - see ...


2

It does really depend on the project and what type of data you're using (and what you know how to use) but Tom Macwright made this handy simple Map Makers cheat sheet: https://github.com/tmcw/mapmakers-cheatsheet


2

Basically I just set a count attributes as the following codes: data.push( { attributes: {count:commuterAmt}, geometry: { spatialReference: { wkid: 102100 }, type: "point", x: coordXicon, y: ...


2

The basic algorithm is to check every segment of the polygon and find the closest point for it. This will either be the perpedicular point (if it is on the segment) or one of the endpoints. After doing this for all segments, pick the point with the smallest total difference. So in your example it would be the segments: AB, outside, pick B BC, inside, try ...


2

Find the two nearest points to your point; just do this with pythagoras, but don't sqrt, you don't need the distance, only the order. Work out the gradient between these two points (y1-y2)/(x1-x2) where 1 is one of the points and 2 is the other. This is from solving y=mx+c for m for the two points (simultaneous equation). Then use one of these points to ...


1

Hey plain CSS did the trick: .leaflet-container { background-color:rgba(255,0,0,0.0); }


1

solved It: function calculateArcPointsGeo(center, radius, startAzimuth, endAzimuth, segments) { var pointList = [], point, i, d = radius / 1000, // d = distance in km R = 6371, // km, R = earth's radius (mean radius = 6,371km) lat1 = deg2Rad(center.Y), lon1 = deg2Rad(center.X), ...


1

You are getting an error message from the server back in XML. You can view the message by extracting a tile url being sent to the server. This is easy to do in IE - just right-click on the map and copy the image url. Otherwise use Firebug or the debug tools in Chrome to extract the URL. Then just paste it into the browser directly. I'm not sure why you are ...


1

It looks to me like you are trying to use the features array returned by QueryTask when it is empty. I.e. If 'result' is the name of the variable you're using in your QueryTask call back, then result.features is the array of features it returns. You need to check the length of the array, e.g.: if (result.features && result.features.length > 0) ...



Only top voted, non community-wiki answers of a minimum length are eligible