Select to view content in your preferred language

how to add point graphic to map?

3148
5
09-02-2015 11:47 AM
johnbrosowsky
Frequent Contributor

I am following the example to add a point to a 3D map found here;

https://developers.arcgis.com/javascript/beta/sample-code/3d/add-graphics/

... and the example works great for adding a point graphic to the map in London.

But I cannot change the location of the graphic that gets added. For example, I need to change the point to appear in Minnesota USA,  not London.  So I change the XY in the example from London to US like this:

var point = new Point({ x: -94.15011, y: 45.55305, z: 1500 }),

... but the point will not appear on the 3D map. It appears on the 2D map in the right spot. The problem appears to be the Z value. The only value that seems to work is 30000, and that puts the point up in the upper atmosphere. No other value for Z will display the point.

Can anyone help me understand where I am going wrong?  It must be simple I am sure!

Thank you!!

Tags (1)
0 Kudos
5 Replies
KenBuja
MVP Esteemed Contributor

This seems to work correctly

JS Bin - Collaborative JavaScript Debugging

johnbrosowsky
Frequent Contributor

your example link works for me.

Also if I save your example to an .HTML file and host on my own web server it works - so long as I view the page in IE or Firefox.  But in Chrome the point does not appear.  Any ideas why that would not work for chrome?

0 Kudos
johnbrosowsky
Frequent Contributor

to clarify, your example does not work for me in chrome but does work in IE.  In IE I see the line and the point, but in chrome I only see the line. The point is missing.

0 Kudos
KenBuja
MVP Esteemed Contributor

I'm seeing the same issue. It works in IE (11.0.9600) and Firefox (40.0.2), but not Chrome (44.0.2403.155)

BjornSvensson
Esri Regular Contributor

john brosowsky - This is a bug in the beta 1 that will be fixed for beta 2. Thank you for reporting it.