POST
|
In my proof of concept app (see link below), when you click on the button, the map of Haiti is highlighted and the country's name is displayed in the side panel. You will zoom in a bit further when you click the map of the country and the name of a city is displayed in the side panel. ICGC WEB PORTAL I would like to do something similar when clicking on the name of the country in the side panel. That is, zoom a bit further to Haiti.Any suggestions as to the best way to get this done would be appriciated Chris
... View more
10-23-2015
01:37 PM
|
0
|
1
|
3591
|
POST
|
John: Thanks for pointing that out!! Problem solved!! Chris
... View more
10-15-2015
08:57 AM
|
0
|
0
|
26
|
POST
|
By clickable I mean when you click on the city, data about the city will be displayed in the side panel So here is what I am trying to make happen: Step 1, Click on the country and zoom into and center on the city. Step 2. Click on the city and data about the city is displayed in the side panel I defined a city url: var cityURL = 'http://....../StRaphaelOSM/MapServer/; and added the following code var cityLayer = L.esri.featureLayer( ).addTo(map); cityLayer.on('click', function(evt) { var bounds = evt.layer.getBounds() map.fitBounds(bounds); });
... View more
10-13-2015
09:31 PM
|
0
|
2
|
26
|
POST
|
I am trying to do the following: When you click on a button, a country or a set of highlighted countries are displayed. next, click on a country and you zoom in to a highlighted city or cities. I want to display the city/cities as a clickable layer when you zoom in Currently, I can click and zoom in on a highlighted country and the city looks like a dot.. (ICGC WEB PORTAL ) Any suggestions are welcome!! Chris
... View more
10-05-2015
09:03 AM
|
0
|
4
|
3404
|
POST
|
I have the following app (ICGC WEB PORTAL) Based on which button at the top clicked on, certain countries are highlighted, I need help with the following: I want to pan to(?)/center on the country clicked on as well as increase the zoom level. This is my attempt function getExtent(){ var lat = map.getCenter().lat; var lng = map.getCenter().lng; var newCord = [lat, lng]; return newCord; } function highlightFeature(e){ var newCenter = getExtent(); <-- var layer = e.target [stuff omitted] } function onEachFeature(feature, layer){ layer.on({ click: highlightFeature }); } countries = L.geoJson(featureCollection, { onEachFeature: onEachFeature }).addTo(map); Script attached
... View more
09-26-2015
07:23 AM
|
0
|
2
|
5170
|
POST
|
Hey John, My bad!! I was using an old version of my app Thanks Chris
... View more
09-14-2015
01:20 PM
|
0
|
0
|
19
|
POST
|
I have a esri-leaftlet app that works when I use a cloudfront base (tile) map but I get errors when I change to a Stamen base map. (See link below) ICGC WEB PORTAL .... When I click on a button to see the first (News) button, I get the following error: Uncaught TypeError: Cannot read property 'trim' of undefined o.Util.trim @ leaflet.js:5 cleanUrl @ Util.js:387 exports.Task.L.Class.extend.initialize @ Task.js:28 o.Class.extend.e @ leaflet.js:5 query @ Query.js:229 (anonymous function) @ icgcWebMap5.html:261 n.event.dispatch @ jquery.js:4435 n.event.add.r.handle @ jquery.js:4121 And if I click on any of the other buttons, I get the following error: Uncaught TypeError: Cannot read property 'query' of undefined (anonymous function) @ icgcWebMap5.html:329 n.event.dispatch @ jquery.js:4435 n.event.add.r.handle @ jquery.js:4121 I at a total loss as to why this is happening. Any help would much appreciated Thanks Chris
... View more
09-12-2015
05:09 PM
|
0
|
2
|
4739
|
POST
|
Thanks John!! I re-read the documentation after reading your reply and everything is working again Chris
... View more
08-26-2015
08:51 AM
|
0
|
0
|
12
|
POST
|
I'm tring to update an app I created with esri-leaflet and esri-leaflet-related. Based on what I've read in the notes on the releases for both esri-leaflet and esri-leaft-related. I've updated my app to point to the cdn versions of (see below): leaflet: version 0.7.3 esri-leaflet: version 1.0..0 esri-leatlet-related: version 1.0.2 <script src="//cdn.jsdelivr.net/leaflet/0.7.3/leaflet.js"></script> <script src="//cdn.jsdelivr.net/leaflet.esri/1.0.0/esri-leaflet.js"></script> <script src="//cdn.jsdelivr.net/leaflet.esri.related/1.0.2/esri-leaflet-related.js"></script> but I am getting the following error: TypeError: a is undefined http://cdn.jsdelivr.net/leaflet.esri/1.0.0/esri-leaflet.js Line 20 Note: I'm clicking on a button that triggers following (partial script): $('#NSM').click(function(){ buttonPicked = 'NSM'; buttonType = document.getElementById('NSM'); var query = L.esri.Tasks.query(tableURL).where("type like '" + buttonType.value + "'"); var rquery = L.esri.Tasks.queryRelated(tableURL).relationshipId("0"); query.ids(function(error, ids, response) { ...... any ideas as to what's happening would be appreciated Regards Chris P.S Please let me know if need to a copy of my script uploaded
... View more
08-25-2015
09:37 PM
|
0
|
2
|
3534
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|