AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
09/26/12 08:11 AM (13 years ago)

Map Pins on Android from URL (or not as the case seems to be)

Hi - I'm working on an app that will use about 80 to 100 pins on google maps and I'd like to link them from a URL. I have a test app, it has two map pages, Map One and Map Two, with only a couple of pins added. On Android, Map One has two pins that I have added to the plugin directly - this works. Map Two has two pins that are referenced from a URL (@Stobe's test data from his map maker tool) and the map shows, my device location shows, but the pins do not show. On iPhone, both Map One and Map Two display location pins as expected. Any idea's anyone please?
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
09/26/12 08:17 AM (13 years ago)
Someone please help AlanMac out. I'm unfortunately not setup to test Android apps currently. @AlanMac, can you supply the dataURL you are using to test with so someone else can put it in their app to test?
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
09/26/12 08:23 AM (13 years ago)
The test data file is on https://dl.dropbox.com/u/49976360/Maps/MapData.txt All ideas or suggestions welcome Thanks, Alan
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
09/26/12 02:25 PM (13 years ago)
If anyone can say that they have a BT 2.0 Android app working from mapdata via URL it would be good to know. Thanks, Alan
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
10/04/12 12:13 PM (13 years ago)
I'm having a similar issue, I am unable to render the map. I have tested it after retrieving the MD5 and code from Google. My pins show up on what looks to be a "grid."
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
10/05/12 01:17 AM (13 years ago)
I have seen this Maps behaviour, but the fix is different if you are in 'debug mode' compared to 'release mode'. To use the keys in your android app, go to \res\values\strings.xml and enter the values for the debug and release keys (without quotes). In your AndroidManifest.xml file, which is in the root folder of your project, uncomment the lines near the bottom of the file that look like the following. For clarity, check the README file that came with your project. <!-- required libraries for maps --> <uses-library android:name="com.google.android.maps"/> This will work for development. When it comes to the release version of the app, two more changes need to be made. In your AndroidManifest.xml file, change the line android.debuggable = "true" to android.debuggable = "false" In the \res\layout\screen_map.xml file, change the line that reads android:apiKey="@string/googleMapsAPIKeyDebug" to android:apiKey="@string/googleMapsAPIKeyRelease" (notice all that has changed is the word Debug to Release). Once you have done this, the app *should* display maps (instead of grey grids) on the device.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
10/05/12 01:19 AM (13 years ago)
btw, credit for this information to GoNorthwest and fred@myskylla, without whose help I would never have got maps on Android working.
 
fratony
I hate code!
Profile
Posts: 77
Reg: Aug 14, 2012
Devon
5,370
like
11/27/12 09:07 AM (13 years ago)
AlanMac - please can you clarify what "uncomment the lines..." actually means. I can see the lines - if I wanted to uncomment them, what would I do? Thanks.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
11/27/12 11:08 AM (13 years ago)
I'm referring to the <!--commenting out--> syntax. It may be that the lines do not have comments. If it look like <uses-library android:name="com.google.android.maps"/> things are already uncommented.
 
fratony
I hate code!
Profile
Posts: 77
Reg: Aug 14, 2012
Devon
5,370
like
11/27/12 11:46 AM (13 years ago)
Thanks AlanMac - appreciate the clarification
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.