Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
de.pentabyte:google-static-map-creator
Advanced tools
Java-API for creating static Google Maps links. Static Maps API v2 Docs
Features:
Disclaimer: This is a 3rd-party library without affiliations with Google.
Add this dependency to your pom.xml (artifact available at Maven Central):
<!-- https://mvnrepository.com/artifact/de.pentabyte/google-static-map-creator -->
<dependency>
<groupId>de.pentabyte</groupId>
<artifactId>google-static-map-creator</artifactId>
<version>2.3.0</version>
</dependency>
Get yourself an API key for the Maps Static API from Google API Dashboard.
Now you are ready to create map urls by calling de.pentabyte.googlemaps.StaticMap.toString().
The rest of this document is a list of examples. You will see the source code and the resulting Google Map image. Please note: the Google Maps images have been downloaded from Google for documentation purposes only. They are copyrighted by Google and you cannot use them in any other way.
Just present a location without any markers or polylines.
StaticMap map = new StaticMap(400, 200, APIKEY);
map.setLocation("Eiffeltower", 16);
map.setMaptype(Maptype.hybrid);
map.toString(): https://maps.googleapis.com/maps/api/staticmap?size=400x200¢er=Eiffeltower&zoom=16&maptype=hybrid&key=*****
If there is more than one annotation present, the map's center and zoom will be set automatically.
StaticMap map = new StaticMap(400, 200, googleApiKey);
map.setMaptype(Maptype.hybrid);
map.addMarker(new StaticMarker("Eiffeltower"));
StaticMarker notreDame = new StaticMarker(48.853000, 2.349983);
notreDame.setLabel('N');
notreDame.setColor(StaticColor.orange);
map.addMarker(notreDame);
map.toString(): https://maps.googleapis.com/maps/api/staticmap?size=400x200&maptype=hybrid&markers=Eiffeltower&markers=color:orange%7Clabel:N%7C48.853%2C2.349983&key=*****
StaticMap map = new StaticMap(400, 200, APIKEY);
map.setMaptype(Maptype.hybrid);
StaticMarker m1 = new StaticMarker(50.844943, 6.856998);
m1.setCustomIconUrl("http://cableparks.info/poi.png");
map.addMarker(m1);
StaticMarker m2 = new StaticMarker(50.844782, 6.856730);
m2.setCustomIconUrl("http://cableparks.info/poi_2.png");
map.addMarker(m2);
map.toString(): https://maps.googleapis.com/maps/api/staticmap?size=400x200&maptype=hybrid&markers=icon:http:%2F%2Fcableparks.info%2Fpoi.png%7Cscale:2%7C50.844944%2C6.856998&markers=icon:http:%2F%2Fcableparks.info%2Fpoi_2.png%7Cscale:2%7C50.844784%2C6.85673&key=*****
List<StaticLatLon> coords = new ArrayList<>();
coords.add(new StaticLatLonImpl(40.800568, -73.958185));
coords.add(new StaticLatLonImpl(40.796855, -73.949294));
coords.add(new StaticLatLonImpl(40.764311, -73.973011));
coords.add(new StaticLatLonImpl(40.768060, -73.981840));
coords.add(new StaticLatLonImpl(40.800568, -73.958185));
StaticPath centralPark = new StaticPath(coords);
centralPark.setColor(StaticColor.red);
centralPark.setFillColor("black");
StaticMap map = new StaticMap(400, 200, googleApiKey);
map.addPath(centralPark);
map.toString(): https://maps.googleapis.com/maps/api/staticmap?size=400x200&path=color:red%7Cfillcolor:black%7Cenc:oz_xFr%7DkbMdVqv@jjEfsCmVdv@cjE%7BrC&key=*****
FAQs
JAVA API for creating Google Static Map URLs.
We found that de.pentabyte:google-static-map-creator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.