Greetings;
I have created two address locators, one for address points and one for streets; I have combined them into a composite locator and published as a service in ArcGIS server. The spatial reference of participating locators are in state plane and the composite address locator in GCS_WGS_1984. Then in PMG template, I changed �??pmgConfig.locatorURL�?� variable in �??settings.optional.js�?� to point to my published locator service.
Now, when I access my PMG maps, and start typing in few characters in search box, I can see the autocomplete feature showing the related entries as I type. When I click on the search result to go to the location, the map pans to the coast of Africa and when I zoom out, I do see a point marked in the correct place. I don�??t know why the location is correctly marked but the map pans to a wrong place. I appreciate your help in this matter.
FYI, I used �??42105 churchpoint rd, gonzales�?� as my search criteria. You can see my locator returns X,Y very similar to ESRI�??s built in locator. The spatial reference of both of the following locators are 4326.
My Locator:
http://gis.apgov.us/APGarcGIS/rest/services/Locators/ApgCompositeSearch/GeocodeServer
Locator from PMG:
http://tasks.arcgis.com/ArcGIS/rest/services/WorldLocator/GeocodeServer
[ATTACH=CONFIG]14203[/ATTACH]
In the showResults function, the locator converts the point and extent separately from geographic to web mercator and then sets the extent and adds the graphic. It sounds like maybe the extent is already in web mercator or maybe the extent is not getting returned from the locator. It might be good to check and see if the locator is returning all columns and results and that the extent (west,south,east,north) is set. Can you console.log() an extent that is returned and see what it says?
Hope that helps.
Thanks Matt for your help. Yes, my locator is not outputting extents. I don't know of a way to create such a locator, I haven't noticed any options related to extents while creating my locator. I've used the standard menu driven way to create my locator. Is there a way to make the locator output extents in addition to X,Y?
I was able to find a workaround for my issue. I changed the following lines in ShowResults function in layout.js. I've used the X,Y that my locator is returning and came up with a buffer around the point for the extents.
var xminNew = parseFloat(geocodeResults[numResult].location.x-0.011);
var yminNew = parseFloat(geocodeResults[numResult].location.y-0.011);
var xmaxNew = parseFloat(geocodeResults[numResult].location.x+0.011);
var ymaxNew = parseFloat(geocodeResults[numResult].location.y+0.011);
This seems to work for now.
Regards,
Vijai
.addressToLocations(address,["*"]);
Thanks Matt for your help. Yes, my locator is not outputting extents. I don't know of a way to create such a locator, I haven't noticed any options related to extents while creating my locator. I've used the standard menu driven way to create my locator. Is there a way to make the locator output extents in addition to X,Y?
I was able to find a workaround for my issue. I changed the following lines in ShowResults function in layout.js. I've used the X,Y that my locator is returning and came up with a buffer around the point for the extents.
var xminNew = parseFloat(geocodeResults[numResult].location.x-0.011);
var yminNew = parseFloat(geocodeResults[numResult].location.y-0.011);
var xmaxNew = parseFloat(geocodeResults[numResult].location.x+0.011);
var ymaxNew = parseFloat(geocodeResults[numResult].location.y+0.011);
This seems to work for now.
Regards,
Vijai
Hello!
First, Thank you for the map gallery! It has made displaying our maps and applications soo much better and simpler for the public! I have two questions: I need my applications to open in a separate window when the users view them (cannot find where to do this!!). Some people find it difficult to navigate back to the gallery. Next, in the elections gallery (which only is using a simple viewer) my zoom arrows are not working?? I am not a programer, but have gained limited experience with all our online apps we have now.
Map Gallery: http://publicgis.bartowga.org/
Elections Gallery: Bottom Left Corner of Gallery or at http://publicgis.bartowga.org/elections/index.html
Thanks for the help in advance!
Jacqueline
Bartow GIS
// Open gallery thumbnail links in a new window/tab pmgConfig.openGalleryNewWindow = false;
Hi David,
Does your group have any web maps in it?
Can you post your config file and I'll see if I can diagnose the problem.
Thanks
I have a few map services that I enabled security on in ArcGIS server, but they won't allow me to view them in the gallery. The funny thing is, it works on my ios device and not the pc. Any suggestions on what the cause could be?
http://gis.arlingtonva.us/gallery/map.html?webmap=18a91293312d4d80aaef321bb361a40e
[ATTACH=CONFIG]15210[/ATTACH]