jwasilgeo / ionic-esri-map

An Ionic app demonstrating how to use the Esri ArcGIS API for JavaScript.
11 stars 5 forks source link

Click for Popup Off from Point #19

Open djrpascu opened 8 years ago

djrpascu commented 8 years ago

I am testing waters with an Ionic app using the following: JS API - 4.0beta3 Angular-Esri - angular-esri-map@2.0.0-beta.2

I have a simple map with a feature layer and a popup template. The feature points get drawn correctly, but when I click on it to view the popup nothing shows. If I click near the point but totally off it, the popup shows. It's like there's an offset issue.

Has anyone seen this?

andygup commented 8 years ago

@djrpascu I'd suggest switching over to the production versions of the ArcGIS JS API v4.0 and angular-esri-map@2 and giving that a try.

djrpascu commented 8 years ago

@andygup thanks, but when I use the production versions, I'm not able to get a map at all. I don't get any errors in the browser and it looks like the last thing loaded is http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/. I'm not seeing the requests to get tiles as I would if I were using the beta versions. Any ideas? I'll work on getting the code on Github. Thanks!

andygup commented 8 years ago

Ah gotcha. Since this is an experimental repo -->JS API 3.17 + angular-esri-map1 + cordova without Ionic is the best combination at the moment based on our research.

There are a few known issues:

djrpascu commented 8 years ago

Thanks for those points! I'll drop it down to 3.17 and see if I can get further. Here's what I was working on, basically started with the Ionic sidemenu starter and used your project and angular-esri to get up and running: EVChargeStations

andygup commented 8 years ago

Oh, sweet! If you have suggestions, improvements etc feel free to do a pull request or open issues. Any additional eyes we can get on this are appreciated as we continue to chip away at it.

We'll leave this issue open for now to see if you can swat it down.

djrpascu commented 8 years ago

Changed code to 3.17 and angular-esri-map1, popups are working well. Updated my Github. Side Note: How can I get the map object in my controller? I can access it via the load callback, but I don't know how to expose it in controller. I want to pass in a point from a list and invoke the centerAt function to re-position the map.

jwasilgeo commented 8 years ago

@djrpascu have you had a chance to look over this page in our angular-esri-map guides? http://arcgis.github.io/angular-esri-map-site-v1/#/patterns/references-to-map-and-layers

You may be interested in the registry pattern.

Otherwise, if you want to continue trying within the load callback, you could check out the first example listed here to get some ideas: http://arcgis.github.io/angular-esri-map-site-v1/#/patterns/other-esri-classes It would eventually come down to when and how you declare a var and when you later set the map obj to that declared var.

jwasilgeo commented 8 years ago

PS: I think the docs for angular-esri-map v2 (JSAPI 4) do a good job of showing how the registry pattern can be used in other controllers: https://esri.github.io/angular-esri-map/#/examples/registry-pattern

djrpascu commented 8 years ago

@jwasilgeo big thanks! oddly i missed this entirely and was trying to read through the example code in github as well as the angular-esri JS file itself. i am now on the right path! much mahalo!